package bos_management.base.standardTest;

import java.util.List;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.annotation.Transactional;

import cn.itcast.bos.dao.base.StandardRepository;
import cn.itcast.bos.domain.base.Standard;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations="classpath:applicationcontext.xml")

public class test01 {
	@Autowired
	private StandardRepository repository;
	@Test
	public void demo01(){
		List<Standard> list = repository.findByName("1");
		System.out.println(list);
		
	}
	
	@Test
	public void demo02(){
		List<Standard> list= repository.quryname("1");
		System.out.println(list);
	
		
	}
	
	
	
	@Test
	@Transactional
	@Rollback(false)
	public void demo03(){
		repository.updateTest(3, "1");
		
		
	}
}
